Control device for stepping motor

ABSTRACT

A control device for a stepping motor of the present invention stores setting data for controlling a state of the stepping motor in a data storage unit for each of a plurality of basic control items obtained by classifying control from activation to stoppage of the stepping motor. In addition, the control device for the stepping motor includes a plurality of modules that execute processing with respect to the basic control items and a module control unit that specifies the order of executing the processing by the plurality of modules in advance, and controls the stepping motor by operating the modules in accordance with the specified executing order based on the setting data stored in the data storage unit.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority fromthe prior Japanese Patent Application No. 2006-132433, filed on May 11,2006, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a control device for a stepping motorand an image forming device using a stepping motor. Further, the presentinvention relates to a sequence control device.

2. Description of the Related Art

In general, a stepping motor is used to control rotation of aphotoconductive drum and a transfer belt in an image forming device suchas an MFP, a copier, and a printer. The stepping motor is a motor whichis driven by supplying a predetermined excitation pattern to a driver.The stepping motor can be rotationally controlled for a step anglecorresponding to the supplied excitation pattern, and is used in a widevariety of fields. As the excitation pattern, there are patterns such as1 phase excitation, 2 phase excitation, and 1-2 phase excitation.

A control device for the stepping motor includes a timer and a clocksignal is generated based on a reference timing signal generated in thetimer. The clock signal is used to prepare the excitation pattern.Therefore, a rotational speed can be controlled by optionally setting acycle of the timing signal from the timer.

On the other hand, processing of output control of the timer, control ofa motor or the like has conventionally been carried out by incorporatinga controlling function in a CPU or by using an exclusive IC. Forexample, when control of the stepping motor is carried out by using theCPU, a variety of types of control are carried during a period betweenstart and stop of drive of the motor. These types of control have beencarried out by internal interruption of the CPU and building a programby utilizing DMA (Direct Memory Access).

However, the CPU also carries out control of parts other than the motor.Therefore, the more there are targets to be controlled, the more theprocessing such as interruption which lowers performance of the CPU. Forthis reason, the control by the CPU has an upper limit in programprocessing. In order to reduce this restriction, the processing of theCPU needs to be dispersed. In order to achieve this, the above situationis responded by a method such as a plurality of the CPUs are used. Whena plurality of the CPUs are used, peripheral devices such as ROM and RAMare necessary for each of the CPUs, and also a communication means forreciprocally reporting a state between the CPUs needs to be included.

Jpn. Pat. Appln. Laid-Open Publication No. 2001-359292 describes a motorcontrol device for controlling traveling of a movable body. This is anexample where region information is generated based on positionalinformation and speed information in the traveling of the movable body,and parameters for controlling a motor set for each region are read outfrom a memory circuit to control the motor. However, the regioninformation needs to be generated for an entire section of the travelingof the movable object, and a circuit configuration is complicated.

In addition, Jpn. Pat. Appln. Laid-Open Publication No. 8-168295discloses a control method of a stepping motor. In this example, a drivevoltage of the stepping motor is changed depending on an operating stateto ensure activation and stoppage of the stepping motor.

In addition, Jpn. Pat. Appln. Laid-Open Publication No. 2002-268471discloses an ASIC incorporating a programmable sequencer and an imageforming device. In this example, the ASIC for controlling a power sourceis included in a copier, a printer, etc. The ASIC controls a change to apower conservation mode and a return sequence from the powerconservation mode.

In addition, Jpn. Pat. Appln. Laid-Open Publication No. 7-311607describes a sequence control method suitable for manufacturing asemiconductor device. In this example, a CPU is provided both on aconsole side and on a processing device side. Under control of the CPUon the console side, a plurality of operational commands and executingtimings of operation are stored in a storage means. The operationalcommands are read out for each of the executing timing and processing isexecuted on the processing device side.

Further, Jpn. Pat. Appln. Laid-Open Publication No. 11-202913 disclosesa control device of a Programmable Machine Controller. This example isfor controlling a target to be controlled in accordance with a sequenceprogram, and for carrying out interruption processing based on a changein a state of the target to be controlled.

The present invention provides a control device for a stepping motor, animage forming device, and a sequence control device, the control devicefor a stepping motor capable of controlling with a high degree offreedom by classifying basic control such as a stepping motor into aplurality of parts and executing processing sequentially.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a configuration diagram showing an entire configuration of animage forming device according to an embodiment of the presentinvention;

FIG. 2 is a block diagram showing one embodiment of a control device fora stepping motor according to the embodiment of the present invention;

FIGS. 3A and 3B are explanatory views showing an example of a schematicconfiguration diagram of the stepping motor and an excitation pattern;

FIG. 4 is an explanatory view for explaining an operational sequence ofthe control device for the stepping motor according to the embodiment ofthe present invention;

FIG. 5 is an explanatory view for explaining a setting example of a ringsequence of the control device for the stepping motor according to theembodiment of the present invention;

FIG. 6 is an explanatory view for explaining a setting example of a ringsequence of a sequence control device according to the embodiment of thepresent invention; and

FIGS. 7A, 7B, and 7C are explanatory views for explaining resetting of asequence of the control device for the stepping motor according to theembodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Throughout this description, the embodiment and example shown should beconsidered exemplars, rather than limitations on the apparatus andmethods of the present invention.

Hereinafter, an embodiment of the present invention will be described indetail with reference to the accompanying drawings. In each of thedrawings, the same parts are marked with the same numerical numbers.

FIG. 1 is a configuration diagram showing an image forming deviceaccording to an embodiment of the present invention. In the followingdescription, an MFP is described as an example. However, the followingdescription is applicable to an image forming device such as a printer,a copier, etc.

In FIG. 1, the numerical number 10 denotes the image forming device. Theimage forming device 10 has, on an upper part thereof, an operating unit11, a displaying unit 12, a scanner unit 13, an automatic documentfeeding device (ADF) 14, a transparent document table 15, and anexposure unit 16.

In addition, the image forming device 10 includes, at a center partthereof, an image forming unit 20. The image forming unit 20 isconfigured with, for example, a laser printer of an electrophotographicsystem. The image forming unit 20 forms an image of each color of K(black), C (cyan), M (magenta), and Y (yellow).

The image forming device 20 has four sets of process units 21K, 21C,21M, and 21Y arranged along a moving direction X of paper. Each of theprocess units 21K, 21C, 21M, and 21Y has photoconductive drums 22K, 22C,22M, and 22Y which are image carriers. The photoconductive drums 22K,22C, 22M, and 22Y are arranged such that a rotational axis thereof is inparallel with a main scanning direction. Also, the photoconductive drumsare arranged in a line with intervals of a predetermined pitch in themoving direction X of paper (sub-scanning direction).

In addition, the process units 21K, 21C, 21M, and 21Y can entirely bemounted in and removed from the image forming device 10. Alternatively,the process units 21K, 21C, 21M, and 21Y can individually be mounted inand removed from the image forming device 10.

Each of the process units 21K, 21C, 21M, and 21Y has a configurationsimilar to the others, therefore the process unit 21K is exemplified anddescribed here. The process unit 21K is configured to include anelectric charger 23K, a developing unit 24K, a cleaner 25K arrangedaround the photoconductive drum 22K. In addition, transfer units 26K,26C, 26M, and 26Y configured with a corona wire or a roller are providedto face the photoconductive drums 22K, 22C, 22M, and 22Y. The transferunits 26K, 26C, 26M, and 26Y constitute a transfer member.

In addition, the image forming unit 20 has a paper feeding unit 40 on alower part thereof. The paper feeing unit 40 includes a plurality ofpaper feeding cassettes 41 and 42 for containing paper of a variety ofsize. Paper from the paper feeding cassettes 41 and 42 is sent to aconveying belt 44 via a resist roller 43, and is further sent in adirection toward the transfer unit 26Y. The conveying belt 44 conveyspaper by moving in a circulating manner by rotation of rollers 45 and46. The resist roller 43 and the conveying belt 44 constitute a paperconveying member.

Paper is first conveyed to the process unit 21Y, and then sent to theprocess units 21M, 21C, and 21K sequentially, so that an image of eachcolor is formed. Description of image forming processing of black willbe described below. A front surface of the photoconductive drum 22K isentirely electrified by the electric charger 23K, and then exposed by alaser beam output from the exposure unit 16 to form an electrostaticlatent image. The electrostatic latent image formed on thephotoconductive drum 22K is developed by the developing unit 24K and atoner image of black is formed on the photoconductive drum 22K. Thetoner image is transferred by the transfer unit 26K to from a blackimage on paper. Waste toner remaining on the front surface of thephotoconductive drum 22K after the transfer is removed by the cleaner25K.

Paper which has a color image formed thereon is conveyed to a fixingunit 30. The fixing unit 30 includes a heat member 31 and a pressingmember 32, and fixes the toner on the paper. Then, the paper whichpassed through the fixing unit 30 is discharged via a paper dischargingunit 47.

A stepping motor is used for rotational drive of the photoconductivedrums 22K, 22C, 22M, and 22Y used in the image forming processing androtational drive of the resist roller 43, etc. used for the paperconveyance. In particular, when a color image is formed, paper passesthrough four sets of process units 21K, 21C, 21M, and 21Y of black,cyan, magenta, and yellow. Therefore, conveyance and positioning of thepaper is important. In order to carry out accurate image formingprocessing, the stepping motor is suitable.

In addition, in an image forming device of an intermediate transfer beltsystem, the stepping motor may be used for drive of an intermediatetransfer belt. When there are a plurality of the stepping motors to becontrolled, a plurality of control devices are provided in order tocontrol each of the stepping motors. In addition, the control devices ofthe stepping motors are provided with a timer individually.

In the image forming device using the intermediate transfer belt, atoner image on the photoconductive drum is primarily transferred to theintermediate transfer belt. Further, a secondary transfer roller isarranged to face the intermediate transfer belt so that the toner imageon the intermediate transfer belt is secondarily transferred to paper.

In the image forming device of the intermediate transfer belt system,the photoconductive drum and the intermediate transfer belt constitutean image carrier. The secondary transfer roller constitutes a transfermember.

FIG. 2 shows a block diagram of the control device for the steppingmotor according to an embodiment of the present invention. In thepresent embodiment, control from activation to stoppage of the steppingmotor is classified into a plurality of basic control items, and aplurality of modules for executing processing with respect to each ofthe control items are included. The present embodiment has a featurethat the order of execution in each of the modules is specified inadvance, and processing is executed sequentially to control rotation ofthe stepping motor.

The control of the stepping motor can be classified and summarized intothe following five basic control items:

1. Activation wait control;

2. One-shot control;

3. Table reference control;

4. Continuous output control; and

5. Termination (off) control.

Specific contents of hardware processing with respect to the above fivebasic control items will be described later. A plurality of modules 51to 55 in FIG. 2 constitutes an executing means for executing the fiveitems of hardware processing. In addition, a sequencer 56 for optionallysetting the executing order of the processing in the modules 51 to 55 isincluded.

The module 51 is connected with a register group 61. The module 52 isconnected with register groups 621 and 622 via a selector 57. Inaddition, the module 53 is connected with register groups 631 and 632via a selector 58. The module 54 is connected with register groups 641and 642 via a selector 59.

In the description below, the register groups 621 and 622, the registergroups 631 and 632, and the register groups 641 and 642 may becollectively referred to and described as register groups 62, 63, and64, respectively.

Each of the register groups 61 to 64 constitutes a data storage unit ora data storage means to store setting data for controlling a state ofthe stepping motor, for example, a variety of data such as a currentvalue. Each of the modules 51 to 54 reads out the setting data stored inone of the register groups 61 to 64 corresponding thereto, and executesa variety of types of processing based on the read out setting data.

Each of the modules 51 to 54 is connected with a register group 65 forcommon setting. Further, the register group 65 is connected to aprescaler 66. Output of the prescaler 66 is supplied to the modules 51to 54. The prescaler 66 has a function as a timer, and frequency dividesan output signal of an oscillator to generate a clock. The registergroup 65 sets a cycle, etc., of the frequency divided clock.

The sequencer 56 is connected with a register 67 for allocating themodule. The register 67 allocates the modules so that processing isexecuted sequentially.

The sequencer 56 carries out switching over of the selectors 57 to 59,and also supplies an execution permission signal to each of the modules51 to 55 via a signal line 60. The modules 51 to 55 which receive theexecution permission signal execute processing. Therefore, the sequencer56 constitutes a module control unit or a control means for specifyingthe order of execution of processing in the modules 51 to 55 in advance.

In addition, an execution complete signal is supplied to the sequencer56 from the modules 51 to 55. Further, the module 54 is connected with amemory (RAM) 69 via a RAM controller 68.

Output of the modules 51 to 55 is selectively supplied to a waveformgenerating unit 71 via a selector 70, and, at the same time, selectivelysupplied to a current control unit 73 via a selector 72. The selectors70 and 72 are controlled by an executing module selecting signal fromthe sequencer 56, and output of any of the modules 51 to 55 is selected.

The waveform generating unit 71 is connected with a register 74 foroutput setting. The waveform generating unit 71 carries out setting ofan output waveform by the register 74. Output of the waveform generatingunit 71 and the current control unit 73 is supplied to a stepping motor75. Rotation of the stepping motor 75 is controlled in accordance withan excitation pattern.

FIG. 3A shows a simplified configuration diagram of the stepping motor75 which is configured with stator windings 7 and 8 and a rotor 9.Current is supplied to the stator windings 7 and 8 in accordance withthe excitation pattern so that the rotor 9 is rotated.

FIG. 3B shows an example of the excitation pattern. FIG. 3B shows anexample of 1-2 phase excitation. CK denotes a clock, Φ1 denotes A phaseexcitation pattern, Φ2 denotes B phase excitation pattern, Φ3 denotes −Aphase excitation pattern, and Φ4 denotes −B phase excitation pattern.

The clock CK is generated based on a reference timing signal generatedin the timer. A phase state of each of the excitation patterns isdetermined by the clock CK. Therefore, a cycle of the clock can bechanged by optionally setting a cycle of the timing signal from thetimer (hereinafter, referred to as “timer cycle”) Thereby, a rotationalspeed of the stepping motor 75 can be controlled. When the timer cycleis made shorter, the stepping motor 75 rotates at high speed. When thetimer cycle is made longer, the stepping motor 75 rotates at low speed.

FIG. 4 is an explanatory view for schematically explaining operatingsteps of the stepping motor control device according to the presentembodiment. The sequencer 56 builds a plurality of sequences, forexample, a ring sequence including a sequence 0 to a sequence 7 as shownin FIG. 4. The sequencer 56 allocates processing of each of the modules51 to 55 for each of the sequences. Transition among the sequences ismade such that the processing is executed in the order set in advance.

The sequencer 56 starts from the sequence 0 as a starting point, thentransition is made in the order of the sequence 1, the sequence 2, thesequence 3, . . . the sequence 7 and the sequence 1, and the processingprogresses in this order. When sequence disable setting, for example asequence termination condition such as interruption, is set in themiddle of the processing, the processing is terminated (rotation of themotor is stopped) at this stage, and the processing returns to thesequence 0.

In addition, the processing starts from the sequence 0 again by asequence enable setting. For example, the activation wait module 51 isset in the sequence 0 in FIG. 4, and any one of the modules 52 to 55 isoptionally set in the sequences 1 to 7.

As described above, the control of the stepping motor can be classifiedinto 1) activation wait control, 2) one-shot control, 3) table referencecontrol, 4) continuous output control, and 5) termination control. Theplurality of modules 51 to 55 are for executing the five items of thehardware processing in the order set by the sequencer 56. Thereby, themotor control with a high degree of freedom can be made possible.

Here, a processing function of each of the modules 51 to 55 will bedescribed. The modules 51 to 54 execute processing based on the settingdata stored in the register groups 61 to 64.

The activation wait module 51 is a module for making transition to anext sequence at the time an activation factor is generated. In theregister group 61, what is selected as the activation factor is set. Inaddition, when a motor holding current is flown while waiting foractivation, the register group 61 includes a current value of the motorholding current as a variable. At the time the stepping motor iscontrolled, the activation wait module 51 is used as an off state or aconstant hold state, and is fixed to the sequence 0 in the presentembodiment. When the selected activation factor meets the condition inthe waiting state, the processing moves to the next sequence 1.

As the sequence termination condition in this case, the sequence can beterminated by operation of the register by the CPU of an image formingdevice main body and generation of an external interruption signal andan internal interruption signal, etc. One or more optional conditionscan be selected from these conditions. The external interruption signalcan be delayed for an optional period of time from an actual change ofthe signal. The internal interruption signal is generated when a timercount value of another timer reaches to a specified value which was setseparately.

The one-shot control module 52 is a module for making transition to thenext sequence after counting for a specified period of time. After theset count value is counted, the module stops the processing and moves tothe next sequence. The register groups 621 and 622 include the countvalue for the period of time to be counted, and a motor holding currentvalue while this control is executed, etc. as a variable. When thestepping motor is controlled, the module 52 is utilized to carry outpre-hold and post-hold controls.

That is, since a phase state of the motor is not known immediately afterpower is turned on, the stepping motor 75 can reach to a drive startingposition by outputting a predetermined signal and holding it for acertain period of time. This period of time is the pre-hold period. Inaddition, since the motor rotates due to inertia when the motor isstopped, a predetermined period of time until a minute vibration of themotor disappears is set. This period of time is the post-hold period. Inaddition, phase switch over can be selected when execution of theprocessing is started/terminated. In addition, the module 52 functionsas a one-shot output circuit depending on the register setting andsequencer setting.

The continuous output module 53 is a module for switching the output foreach set period of time. In the register groups 631 and 632, a period oftime to be counted and a motor drive current value while the control isexecuted are set as variables, and also a termination condition ofexecuting processing of the continuous output module (sequencetermination condition), etc. is set. In the module 53, a count up signalis generated for each of the count values for a set period of time. Whenthe termination condition of the execution is met, the module is stoppedand the processing moves to the next sequence. The module is used as aconstant speed drive module when the stepping motor is controlled.

As the sequence termination condition in this case, the sequence can beterminated by operation of the register by the CPU of the image formingdevice main body and generation of an external interruption signal andan internal interruption signal, etc. One or more optional conditionscan be selected from these conditions. The external interruption signalcan be delayed for an optional period of time from an actual change ofthe signal. The internal interruption signal is generated when a timercount value of an optional timer including itself reaches to a specifiedvalue which was set separately. Also, the interruption signal isgenerated when a sequencer of an optional timer among timers includingitself is moved to a sequence.

The table reference controlling module 54 reads out data from an addressof the RAM 69 and carries out counting with the data as a count value.After the counting is terminated, the module 54 outputs the count upsignal and reads out data of the next address to similarly carry out thecounting. This operation is repeated for the set number of addressregions, and then the processing by the module 54 is terminated and theprocessing moves to the next sequence. The module 54 is used for slow-upand slow-down controls when the stepping motor is controlled.

At the time of the slow-up, the number of rotation is graduallyincreased by shortening a timer cycle for each step. When reaching thepredetermined number of steps, the processing moves to the next sequence(constant speed processing). At the time of the slow-down, the number ofrotation is gradually decreased by making the timer cycle longer foreach step. When reaching the predetermined number of steps, theprocessing moves to the next sequence (stopping processing). At the timewhen the motor is stopped and if the motor is stopped abruptly, thephase state is disordered and a fault such as step-out may occur.Therefore, the slow-down control is carried out.

In the register groups 641 and 642, a RAM reference starting address, aRAM reference ending address, an address counter addition/subtractionsetting, and the motor drive current value while the control is executedare set as variables. The RAM 69 has influence on CPU processing whenreadout is carried out via a system bus. Therefore, an exclusive RAM (ifa table is definite, a ROM can be used) having a small capacity isdesirably prepared.

In addition, the table reference module 54 can be made to function as acircuit for continuously outputting a variable duty signal, depending onsetting of the registers 641 and 642 and setting of the sequencer 56.

The off sequence module 55 is a module for forcibly making transition tothe sequence 0, and returns the processing to the sequence 0 of theactivation wait sequence.

The count up signal described above is a one-shot pulse output generatedfor each time of count up. At the time the count up signal is generated,there are cases where one edge of the clock is or both edges of theclock are detected. In the case of the one edge detection, the count upsignal can be generated with a half value of the setting value of thetimer. Whether the one edge detection or the both edge detection isadopted is determined by the setting item of the register group 65.

The ring sequencer has the sequence 0 as the starting point, and makestransition of the sequences when the transition condition specific toeach of the modules is met. At termination or start of each of thesequences, the ring sequencer generates an interruption for each of thesequences.

The modules 51 to 55 can achieve a minimum function if there is one foreach of the modules. However, in an actual operation, there is a casewhere resetting of the sequence and a change of parameters of the moduleare requested during one series of operation from activation of themotor throughout the stopping thereof. For this reason, with respect tothe one-shot module 52, the continuous output module 53, and the tablereference module 54, two types of parameters are desirably prepared foreach variable so that the variables can be selected. Therefore, two setsof the setting register groups 62 to 64 are provided.

The registers 61 to 64 can be replaced by a memory. In this case, thememory only need to have a plurality of storage regions which can storea variety of types of setting data.

FIG. 5 is a view for explaining a setting example of the ring sequenceby the sequencer 56 and shows a case where basic acceleration anddeceleration control of the stepping motor is carried out. In FIG. 5,any of the modules 51 to 55 is set with respect to the sequences 0 to 7,and the processing in the modules 51 to 55 is executed sequentially.

FIG. 5 shows control steps from activation of the motor to acceleration,constant speed, deceleration, and stoppage. In the sequence 0, theactivation wait module 51 is set, and the stepping motor 75 is in astate of waiting. In the next sequence 1, the one-shot module 52 is set,and the stepping motor 75 is in the period of the pre-hold. In addition,in the sequence 2, the table reference module 54 is set and the steppingmotor 75 is controlled for the slow-up and in a state where therotational speed gradually increases.

Further, in the sequence 3, the continuous output module 53 is set, andthe stepping motor 75 is in a state of being controlled at the constantspeed. In the sequence 4, the table reference module 54 is set, and thestepping motor 75 is controlled for the slow-down, and the rotationalspeed thereof gradually decreases.

In the sequence 5, the one-shot module 52 is set, and the stepping motor75 is in the period of the post-hold. Then, in the sequences 6 and 7,the off control module 55 is set, and the stepping motor 75 is stopped.

As described above, the sequencer 56 builds the ring sequence inadvance. Also, by setting the optional processing modules 51 to 55 ineach of the sequences, optional control can be executed.

FIG. 6 is a view for explaining operation of the sequence control deviceaccording to an embodiment of the present invention. FIG. 6 shows anexample of generating the timing signal having an optional duty as timeoutput. In the sequence 0, the activation wait module 51 is set. Inaddition, in step 2 and the following steps, the table reference module54 is continuously set. In this case, the table reference module 54refers to a period of time to be counted as the timer from RAM 69. Whenthe counting is carried out for the period of time, the module 54 readsout the next period of time to be counted, and similar processing isrepeated.

Therefore, the timing signal having a duty with a predetermined ratio ofa high “H” period and a low “L” period can be continuously obtained asthe timer output. However, the timer output is in an endless loop inthis state. Therefore, a register for resetting is provided in theregister group 64 so that the loop can be stopped.

In the case of FIG. 6, most of the settings are terminated before thestart of the timer output. Therefore, there is no specific need forsetting by firmware, except that the register for stopping after thesequencer starts operation.

Next, a case in which control exceeding the number of the sequences setby the sequencer 56 in advance is carried out will be described withreference to FIGS. 7A to 7C.

FIG. 7A shows another example of the acceleration and decelerationcontrol of the stepping motor. In initial setting, wait, pre-hold,slow-up, constant speed, slow-up, constant speed, slow-down, andconstant speed, are set by the sequences 0 to 7.

FIG. 7B shows a case in which interruption is output by the register 67,and resetting is carried out with respect to the sequences 1, 2 and 3following the sequences 0 to 7 in the initial setting. The sequence 1 inthe initial setting is the pre-hold processing. However, the nextsequence 1 in FIG. 7B is reset to the slow-down processing. In thiscase, after the processing in the sequence 1 in the initial state isterminated, the resetting is made to be completed before processing inthe next new sequence 1 starts.

Similarly, the sequence 2 in the initial setting is the slow-upprocessing. However, the next sequence 2 is reset to the post-hold. Inaddition, the sequence 3 in the initial setting is constant speedprocessing. However, the next sequence 3 is set to the off controlagain. In any case, in the case of the resetting, the resetting needs tobe completed after the processing in the sequence of the initial settingand before processing in the next new sequence starts.

In addition, as for the resetting, not only a sequence code but also aparameter of the modules 51 to 54 can be reset and modified.

For example, as shown in FIG. 7C, a case in which a parameter of theslow-down of the sequence 6 in the initial setting is modified will bedescribed. The table reference module 54 executes control of theslow-down and the slow-up. Therefore, after the slow-up control of thesequence 2 is terminated, the parameter of the slow-down of the sequence6 is modified, and the modification is made to be completed beforeprocessing in the new sequence 6 starts.

In addition, when a parameter of the constant speed control of thesequence 7 is modified, the modification is made to be carried out afterprocessing of the constant speed control in the sequence 3 is completed.Further, when modifying a parameter of the slow-down control of the nextsequence 1, the modification is carried out after processing of theslow-up control by the sequence 4 in the initial setting is completed.

In the case of FIG. 7C as well, when setting is modified, the parameterneeds to be modified after processing in the sequence set initially iscompleted, and before the processing is executed in the new sequence.

As for setting of a current value in each of the modules, although thecurrent value is not a required variable, the current value can bechanged on a sequence basis in an actual operation. For example, energyin a case of shifting from a stoppage state to a rotating state of themotor is different from energy at the time of constant speed. Therefore,by setting the current value for each of the modules, a drive amount ofthe motor can be appropriately adjusted.

As items of the setting data by each of the registers, the followingsetting items can be considered:

Register 74 for Output Setting:

Phase signal, Switching signal of timer output, Clock, Enable, Resetsignal, Rotational direction signal, Excitation pattern (1-2 phase, 2phase, etc.)

Register 61 for Activation Waiting:

Activation condition, External activation signal valid/invalid, Externalactivation signal allocation, Internal interruption signalvalid/invalid, Internal activation factor allocation, Registeractivation valid/invalid, Current setting, etc.

Register 65 for Common Setting:

Prescaler cycle setting, One edge/both edge output setting (at the timeof clock selecting)

Registers 621 and 622 for One-Shot Control:

Pre-hold, Post-hold, One-shot switching signal, Timer cycle setting,Current setting

Registers 631 and 632 for Continuous Output:

Timer cycle setting, Speed change condition setting, External speedchange signal valid/invalid, External speed change signal allocation,Internal interruption signal valid/invalid, Internal speed change factorallocation, Register speed change valid/invalid, Phase correctionvalid/invalid, Current setting

Registers 641 and 642 for Table Reference:

Reference table starting address setting, Reference table ending addresssetting, Reference ascending order/descending order setting, Currentsetting

Register 67 for Module Allocation:

Sequence 1 module allocation setting, Sequence 2 module allocationsetting, Sequence 3 module allocation setting, Sequence 4 moduleallocation setting, Sequence 5 module allocation setting, Sequence 6module allocation setting, Sequence 7 module allocation setting

In the embodiment of FIG. 2, an example where output of the registergroups 621 and 622 is selected by the selector 57 is described. Aconfiguration in which the register groups 621 and 622 are configured asone register and the selector 57 is omitted can be adopted.

For example, the configuration may be one that an intermediate buffer isarranged between one register and the module 52. In addition, thesetting data stored in the register is read into the intermediatebuffer. The module 52 executes the processing in accordance with theread out setting data.

Then, by writing new setting data in the register, the intermediatebuffer reads out the next new setting data from the register at the timethe corresponding module starts execution of processing. The module 52executes the processing in accordance with the new setting data. In thismanner, the selector 57 can be omitted.

As to the register groups 631 and 632 and the selector 58, and theregister groups 641 and 642 and the selector 59 as well, a configurationin which a single register and an intermediate buffer are provided in asimilar manner can be adopted.

As described above, according to the embodiment of the presentinvention, the control from the activation to the stoppage of thestepping motor is classified into basic control items. The processingwith respect to the basic control items is allocated in a plurality ofthe modules and executed, and necessary variables and the order ofexecution of modules is set in advance, thereby the stepping motor canbe controlled. In this manner, dependency on firmware processing can bereduced. Further, the variables to be set are focused to be minimum,therefore the firmware processing can be simplified.

In particular, in the control of the stepping motor, a wide variety ofapplications are possible by responding to high speed control, etc. ofthe motor and optionally carrying out combination of the sequences. Inaddition, processing necessary for the motor control, etc. is dividedinto five modules. Thereby, different control can be performed only bychanging of a variable, and commonality and simplification of a circuitcan be attempted.

Further, at the switching of the sequence, as for the module whichusage, such as the table reference processing, the one shot processing,and the termination processing is determined in advance, there is noneed for operation for making transition while being operated by fixingthe transition condition of the sequence. In this manner, controlmanagement processing by the CPU can be reduced. In addition, at theswitching of the sequence, a condition of transition from the activationprocessing and the continuous output processing is able to be optionallyselected from the register operation by the CPU, an external input, andthe internal interruption. Thereby, the degree of freedom becomes high,and a load of the CPU can be reduced.

In the above description, the control of the stepping motor and thetimer output control are described as examples. However, an applicationrange of the present invention is wide, and a variety of modificationsare possible in a range not deviating from the scope of claims.

Although exemplary embodiments of the present invention have been shownand described, it will be apparent to those having ordinary skill in theart that a number of changes, modifications, or alterations to theinvention as described herein may be made, none of which depart from thespirit of the present invention. All such changes, modifications, andalterations should therefore be seen as within the scope of the presentinvention.

1. A control device for a stepping motor comprising: a data storage unitthat stores setting data for controlling a state of the stepping motorfor each of a plurality of basic control items obtained by classifyingcontrol from activation to stoppage of the stepping motor; a pluralityof modules that execute processing with respect to the basic controlitems based on the setting data stored in the data storage unit; and amodule control unit that specifies the order of executing the processingby the plurality of modules, wherein the stepping motor is controlled byoperating the modules in accordance with the order of executionspecified by the module control unit, and the setting data of themodules are reset and modified before the processing is executed in anew sequence during rotation of the stepping motor.
 2. The controldevice for the stepping motor according to claim 1, wherein the modulecontrol unit includes a sequencer which makes the processing by anoptional module among the plurality of modules sequentially executed inthe order specified in advance.
 3. The control device for the steppingmotor according to claim 2, wherein the sequencer proceeds theprocessing by making transition to a next sequence when the processingstarts from a sequence of a starting point and processing in a currentsequence is executed, and controls the plurality of modules so as tomake transition to the sequence of the starting point to terminate theprocessing when a termination condition is set in the middle of theprocessing.
 4. The control device for the stepping motor according toclaim 2, wherein the sequencer is configured such that a condition formaking transition to a next sequence can be selected from a plurality ofconditions as to an optional processing module among the plurality ofmodules.
 5. The control device for the stepping motor according to claim1, wherein the basic control items include five kinds of processings;activation wait processing, one shot processing, table referenceprocessing, continuous output processing, and termination processing,and the data storage unit stores a plurality of items of setting datawith respect to the five kinds of processings, and the plurality ofmodules can execute each of the five types of the processings.
 6. Thecontrol device for the stepping motor according to claim 5, wherein thedata storage unit has at least two independent storage regions in orderto store a plurality of items of setting data with respect to the oneshot processing, the table reference processing, and the continuousoutput processing.
 7. The control device for the stepping motoraccording to claim 5, wherein the module that executes the one shotprocessing among the plurality of modules carries out processing of apre-hold period before the stepping motor starts rotation, or apost-hold period before the stepping motor stops the rotation.
 8. Thecontrol device for the stepping motor according to claim 5, wherein themodule that executes the table reference processing among the pluralityof modules carries out processing of a slow-up period until the steppingmotor reaches to a constant speed rotation and processing of a slow-downperiod before the stepping motor moves from the constant speed rotationto a stoppage state by being connected to a memory and sequentiallyreading out and processing data in a predetermined address region of thememory.
 9. The control device for the stepping motor according to claim5, wherein the module that executes the continuous output processingamong the plurality of modules carries out constant rotation processingof the stepping motor.
 10. A control device for a stepping motorcomprising: data storage means for storing setting data for controllinga state of the stepping motor for each of a plurality of basic controlitems obtained by classifying control from activation to stoppage of thestepping motor; plurality of executing means for executing processingwith respect to the basic control items based on the setting data storedin the data storage means; and control means for specifying the order ofexecuting the processing by the plurality of executing means, whereinthe stepping motor is controlled by operating the executing means inaccordance with the order of execution specified by the control means,and the setting data of plurality of executing means are reset andmodified before the processing is executed in a new sequence duringrotation of the stepping motor.
 11. The control device for the steppingmotor according to claim 10, wherein the control means makes processingby optional executing means among the plurality of executing meanssequentially executed in the order specified in advance, and proceedsthe processing by making transition to a next sequence when theprocessing in a current sequence is executed, and controls the pluralityof executing means such that the processing is terminated by makingtransition to a sequence of a stating point when a termination conditionis set in the middle of the processing.
 12. The control device for thestepping motor according to claim 10, wherein the basic control itemsinclude five kinds of processings of an activation wait processing, aone-shot processing, a table reference processing, a continuous outputprocessing, and a termination processing, and the data storage meansstores a plurality of items of setting data with respect to the fivekinds of processings, and the plurality of executing means areconfigured such that each of the five types of the processings is madepossible to be executed.
 13. A control method of a stepping motorcomprising: classifying control from activation to stoppage of astepping motor into a plurality of basic control items; including aplurality of modules capable of executing a plurality of kinds ofprocessing with respect to the basic control items; storing setting datafor controlling a state of the stepping motor for each of the basiccontrol items in a data storage unit; specifying the order of executingthe processing by the plurality of modules; reading out the setting datastored in the data storage unit in accordance with the specifiedexecuting order; sequentially operating the plurality of modules basedon the readout setting data to control the stepping motor; and modifyingthe setting data of the modules before the processing is executed in anew sequence during rotation of the stepping motor.
 14. The controlmethod of the stepping motor according to claim 13, wherein theprocessing by the plurality of modules is sequentially executed in theorder specified in advance; the processing progresses by makingtransition to a next sequence when the processing in a current sequenceis executed; and terminating the processing by making transition to thesequence of a starting point when a termination condition is set in themiddle of the processing.
 15. An image forming device comprising: animage forming unit that forms an image in an image carrier; atransferring member that transfers an image formed in the image carrierto paper; a paper conveying member that conveys the paper to the imageforming unit; a stepping motor that drives at least one of the imageforming unit, the transferring member, and the paper conveying member; adata storage unit that stores setting data for controlling a state ofthe stepping motor for each of a plurality of basic control itemsobtained by classifying control from activation to stoppage of thestepping motor; a plurality of modules that execute processing withrespect to the basic control items based on the setting data stored inthe data storage unit; and a module control unit that specifies theorder of executing processing in the plurality of modules, wherein thestepping motor is controlled by operating the module in accordance withthe executing order specified by the module control unit, and thesetting data of the modules are reset and modified before the processingis executed in a new sequence during rotation of the stepping motor. 16.The image forming device according to claim 15, wherein the imagecarrier of the image forming unit is configured with a photoconductivedrum or an intermediate transfer belt, and uses the stepping motor thatdrives the photoconductive drum or the intermediate transfer belt. 17.The image forming device according to claim 15, wherein the imageforming unit has a process unit for forming an image on the conveyedpaper, and the process unit is mountable to and removable from a mainbody of the image forming device.
 18. A sequence control devicecomprising: a data storage unit that stores setting data for each of aplurality of basic control items obtained by classifying control fromactivation processing to stoppage processing; a plurality of modulesthat execute processing with respect to the basic control items based onthe setting data stored in the data storage unit; and a sequencer thatmakes processing by an optional module among the plurality of modules inthe order specified sequentially, wherein the setting data of themodules are reset and modified after processing in the sequence setinitially is completed, and before the processing is executed in a newsequence.
 19. The sequence control device according to claim 18, whereinthe sequencer proceeds the processing by making transition to a nextsequence when the processing starts from a sequence of a starting pointand processing in a current sequence is executed, and controls theplurality of modules so as to make transition to the sequence of thestarting point to terminate the processing when a termination conditionis set in the middle of the processing.
 20. The sequence control deviceaccording to claim 18, wherein one of the plurality of modules includesa table reference module for being coupled with a memory andsequentially reading out and processing data in a predetermined addressregion of the memory, and the sequencer builds sequences so as tocontinuously repeat processings by the table reference module, thereby atiming signal in which an optional duty is set is continuouslygenerated.